
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
The PowerBuilder environment</TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="pbugp5.htm">Previous</A>&nbsp;&nbsp;<A HREF="pbugp7.htm" >Next</A>
<!-- End Header -->
<A NAME="BFCBIFCD"></A><h1>The PowerBuilder environment</h1>
<A NAME="TI111"></A><p>When you start PowerBuilder for the first time, the Welcome
to PowerBuilder dialog box lets you create a new workspace with
or without targets:</p>
<br><img src="images/wrkg01.gif">
<A NAME="TI112"></A><p>When PowerBuilder starts, it opens in a window that contains
a menu bar and the PowerBar at the top and the System Tree and Clip
window on the left. The remaining area will display the painters
and editors you open when you start working with objects. </p>
<br><img src="images/wrkgpb11.gif">
<A NAME="CHDDFCFF"></A><h2>The System Tree </h2>
<A NAME="TI113"></A><p>The System Tree provides an active resource of programming
information you use while developing targets. It lets you not only
get information, but also drag objects into painter views (such
as the Script view or Layout view) for immediate use. </p>
<A NAME="TI114"></A><p>The System Tree displays by default when you start PowerBuilder
for the first time. You can hide or display the System Tree using
the System Tree button on the PowerBar or by selecting Window&gt;System
Tree. </p>
<A NAME="TI115"></A><h4>Using the Workspace tab page</h4>
<A NAME="TI116"></A><p>The System Tree has a single tab page that provides a view
of the current workspace. The Workspace tab page displays the current
workspace and all its targets. Most targets display the library
list for the target and all the objects in each <ACRONYM title = "pibble" >PBL</ACRONYM>. The Workspace tab page in the
System Tree works like a tree view in the Library painter, but you
can keep it open all the time to serve as the control center of
the development environment. </p>
<A NAME="TI117"></A><p>You can set the root of the Workspace page to your computer's
root directory, the current selection, or any directory or library,
as well as to the current workspace. </p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Working with targets</span> <A NAME="TI118"></A>To see the pop-up menu that lets you perform operations on
a target such as search, build, and migrate, you must set the root
of the System Tree to the current workspace.</p>
<A NAME="TI119"></A><p>The following illustration shows a workspace with two targets.
The first target, orders, has a second library in its library search
path. </p>
<br><img src="images/wnnew01.gif">
<A NAME="TI120"></A><h4>Current target</h4>
<A NAME="TI121"></A><p>The orders target is
bold, indicating it is the current target, which means that it is
the default target used in the New dialog box and for Run and Debug.
The current target is set whenever you:<A NAME="TI122"></A>
<ul>
<li class=fi>Invoke
an action in the System Tree, Library painter, or main menu that affects
a target or a child of a target, such as Build, Migrate, Run, or Debug.
Some actions, such as Search and Migrate, display a dialog box.
If you cancel the action by clicking the Cancel button in the dialog
box, the current target is not changed.</li>
<li class=ds>Open an object painter.</li>
<li class=ds>Change the active object painter. 
</li>
</ul>
</p>
<A NAME="TI123"></A><p>If you prefer to set the current target explicitly using the
Set as Current Target pop-up menu item for the target in the System
Tree or the File&gt;Set Current Target menu item, clear the
Automatically Set Current Target check box on the Workspaces tab
page in the System Options dialog box. To open the System Options
dialog box, select Tools&gt;System Options from the main menu.</p>
<A NAME="TI124"></A><h4>Actions in the System Tree</h4>
<A NAME="TI125"></A><p>You can use the Workspace page as the hub of your PowerBuilder
session. Pop-up menus let you build and deploy targets
and open and edit any object. Double-clicking an event or function
in the System Tree opens its script in the Script view. Events with
scripts have a different icon and are listed before events without
scripts.</p>
<A NAME="TI126"></A><p><A HREF="pbugp6.htm#CEGFJCJD">Table 1-1</A> lists
the actions you can take on each item that displays on the Workspace
page. You can also set properties for each item, choose which object
types display in the tree view, change the root of the Workspace
page, and reset the root to the current workspace.</p>
<A NAME="CEGFJCJD"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 1-1: Action items for objects in the
System Tree</caption>
<tr><th  rowspan="1"  ><A NAME="TI127"></A>Item</th>
<th  rowspan="1"  ><A NAME="TI128"></A>Menu action items</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI129"></A>Workspace</td>
<td  rowspan="1"  ><A NAME="TI130"></A>New (opens New dialog box), Add Target,
Open Workspace, Close, Incremental Build, Full Build, Deploy, Run,
Debug, Show, Properties.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI131"></A>Target</td>
<td  rowspan="1"  ><A NAME="TI132"></A>New, Search, Set as Current Target, Remove
Target, Library List, .NET Assemblies, Migrate, Incremental Build,
Full Build, Deploy, Run, Debug, Show, Properties.<A NAME="TI133"></A><p>.NET Assemblies only displays for .NET targets.</p></td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI134"></A><ACRONYM title = "pibble" >PBL</ACRONYM></td>
<td  rowspan="1"  ><A NAME="TI135"></A>Search, Delete, Remove Library, Import,
Import PB Extension, Optimize, Build Runtime Library, Print Directory,
Show, Properties.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI136"></A>PBD</td>
<td  rowspan="1"  ><A NAME="TI137"></A>Search, Delete, Remove Library, Print
Directory, Show, Properties</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI138"></A>PowerBuilder object</td>
<td  rowspan="1"  ><A NAME="TI139"></A>Edit, Edit Source, Search, Inherit from,
Run/Preview, Copy, Move, Delete, Regenerate, Export, Print,
Properties.<A NAME="TI140"></A><p>Edit Source is not available for project and proxy objects.
Inherit from and Run/Preview are available only for some
object types. Source control items are available only if source
control information is associated with the target.</p></td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI141"></A>Functions and events</td>
<td  rowspan="1"  ><A NAME="TI142"></A>Edit, Properties.<A NAME="TI143"></A><p>The Properties dialog box shows the prototype of the function
or event and its "signature." The signature is
a string that represents the argument types, return types, and passing
style. You use this string when you write a PBNI extension that
calls the function or event. For more information, see the <i>PBNI
Programmers Guide and Reference</i>
.</p></td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI144"></A>.NET assembly</td>
<td  rowspan="1"  ><A NAME="TI145"></A>Show, Properties.<A NAME="TI146"></A><p>.NET assemblies can be added to the System Tree by selecting them
from the Properties dialog box for .NET targets.</p></td>
</tr>
</table>
<A NAME="TI147"></A><h2>The PowerBar</h2>
<A NAME="TI148"></A><p>Like the System Tree, the PowerBar provides a main control
point for building PowerBuilder applications. From the PowerBar
you can create new objects and applications, open existing objects,
and debug and run the current application.</p>
<br><img src="images/wrkg805.gif">
<A NAME="TI149"></A><p>While you are getting
used to using PowerBuilder, you can display a label on each button
in a toolbar to remind you of its purpose. To do so, right-click
any toolbar button and select Show Text from the pop-up menu.</p>
<A NAME="TI150"></A><p><A HREF="pbugp6.htm#CEGDCGBJ">Table 1-2</A> lists
the buttons from left to right on the PowerBar.</p>
<A NAME="CEGDCGBJ"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><caption>Table 1-2: PowerBar buttons and their uses</caption>
<tr><th  rowspan="1"  ><A NAME="TI151"></A>PowerBar button</th>
<th  rowspan="1"  ><A NAME="TI152"></A>What you can use it for</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI153"></A>New</td>
<td  rowspan="1"  ><A NAME="TI154"></A>Create new objects.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI155"></A>Inherit</td>
<td  rowspan="1"  ><A NAME="TI156"></A>Create new windows, user objects, and
menus by inheriting from an existing object.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI157"></A>Open</td>
<td  rowspan="1"  ><A NAME="TI158"></A>Open existing objects.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI159"></A>Run/Preview</td>
<td  rowspan="1"  ><A NAME="TI160"></A>Run windows or preview DataWindows.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI161"></A>System Tree</td>
<td  rowspan="1"  ><A NAME="TI162"></A>Work in the System Tree window, which
can serve as the hub of your development session. For more information
see <A HREF="pbugp6.htm#CHDDFCFF">"The System Tree "</A>.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI163"></A>Output Window</td>
<td  rowspan="1"  ><A NAME="TI164"></A>Examine the output of a variety of operations
(migration, builds, deployment, project execution, object saves,
and searches). See <A HREF="pbugp6.htm#CEGIECAJ">"The Output window"</A>.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI165"></A>Next Error, Previous Error</td>
<td  rowspan="1"  ><A NAME="TI166"></A>Navigate through the Output window.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI167"></A>To-Do List</td>
<td  rowspan="1"  ><A NAME="TI168"></A>Keep track of development tasks you need
to do for the current application and use links to get you quickly
to the place where you complete the tasks.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI169"></A>Browser</td>
<td  rowspan="1"  ><A NAME="TI170"></A>View information about system objects
and objects in your application, such as their properties, events,
functions, and global variables, and copy, export, or print the
information.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI171"></A>Clip Window</td>
<td  rowspan="1"  ><A NAME="TI172"></A>Store objects or code you use frequently.
You can drag or copy items to the Clip window to be saved and then
drag or copy these items to the appropriate painter view when you
want to use them. See <A HREF="pbugp6.htm#CEGDJEHA">"The Clip window"</A>.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI173"></A>Library</td>
<td  rowspan="1"  ><A NAME="TI174"></A>Manage your libraries using the Library
painter.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI175"></A>DB Profile</td>
<td  rowspan="1"  ><A NAME="TI176"></A>Define and use named sets of parameters
to connect to a particular database. </td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI177"></A>Application Server Profile</td>
<td  rowspan="1"  ><A NAME="TI178"></A>Define the connection parameters for
a particular server. You can then use this predefined profile whenever
you need to connect to an application server.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI179"></A>Database</td>
<td  rowspan="1"  ><A NAME="TI180"></A>Maintain databases and database tables,
control user access to databases, and manipulate data in databases
using the Database painter.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI181"></A>Edit</td>
<td  rowspan="1"  ><A NAME="TI182"></A>Edit text files (such as source, resource,
and initialization files) in the file editor.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI183"></A>Incremental Build Workspace</td>
<td  rowspan="1"  ><A NAME="TI184"></A>Update all the targets and objects in
the workspace that have changed since the last build.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI185"></A>Full Build Workspace</td>
<td  rowspan="1"  ><A NAME="TI186"></A>Update all the targets and objects in
the workspace.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI187"></A>Deploy Workspace</td>
<td  rowspan="1"  ><A NAME="TI188"></A>Deploy all the targets in the workspace.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI189"></A>Skip, Stop</td>
<td  rowspan="1"  ><A NAME="TI190"></A>Interrupt a build, deploy, or search
operation. When a series of operations is in progress, such as a
full deploy of the workspace, the Skip button lets you jump to the
next operation. The Stop button cancels all operations.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI191"></A>Debug</td>
<td  rowspan="1"  ><A NAME="TI192"></A>Debug the current target. You can set
breakpoints and watch expressions, step through your code, examine
and change variables during execution, and view the call stack and
objects in memory.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI193"></A>Select &amp; Debug</td>
<td  rowspan="1"  ><A NAME="TI194"></A>Select a target and open the Debugger.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI195"></A>Run</td>
<td  rowspan="1"  ><A NAME="TI196"></A>Run the current target just as your users
would run it. For standard PowerBuilder application targets, the
application runs in the development environment. <A NAME="TI197"></A><p>For .NET and server component targets, you must deploy the target
before you can run it for the first time, and you must specify a
client application for server components. If you have made changes
since you last deployed, you must redeploy to see those changes
when you click the Run button.</p></td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI198"></A>Select &amp; Run</td>
<td  rowspan="1"  ><A NAME="TI199"></A>Select a target and run it.</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI200"></A>Exit</td>
<td  rowspan="1"  ><A NAME="TI201"></A>Close PowerBuilder.</td>
</tr>
</table>
<A NAME="TI202"></A><h4>Customizing the PowerBar</h4>
<A NAME="TI203"></A><p>You can customize the PowerBar. For example, you can choose
whether to move the PowerBar around, add buttons for operations
you perform frequently, and display text in the buttons.</p>
<A NAME="TI204"></A><p>For more information, see <A HREF="pbugp19.htm#X-REF342804801">"Using toolbars"</A>.</p>
<A NAME="TI205"></A><h4>About PowerTips</h4>
<A NAME="TI206"></A><p>In the PowerBar, when you leave the mouse pointer over a button
for a second or two, PowerBuilder displays a brief description of
the button, called a PowerTip. PowerTips
display in PowerBuilder wherever there are toolbar buttons.</p>
<A NAME="CEGDJEHA"></A><h2>The Clip window</h2>
<A NAME="TI207"></A><p>You can store code fragments you use frequently in the Clip
window. You copy text to the Clip window to save it and then drag
or copy this text to the appropriate Script view or editor when
you want to use it. </p>
<A NAME="TI208"></A><h4>Using the Clip window</h4>
<A NAME="TI209"></A><p>The Clip window displays a list of named clips, a preview
of the information contained in the clip, and a description. It
provides buttons to move Clip window contents to the clipboard,
copy clipboard contents to the Clip window, rename a clip, delete
a clip, and modify the clip's description. Clips you save in
one workspace are available in all your workspaces; you might want
to use a naming convention that reflects this. </p>
<A NAME="TI210"></A><p>For example, you might use standard error-checking code when
you use the <b>ConnectToServer</b> function to connect
to <ACRONYM title = "E A Server" >EAServer</ACRONYM>. To copy it
to the clipboard, highlight the code in a Script view and select
Copy from the pop-up menu. In the Clip window, click the Paste icon,
and name the clip. The Clip Description dialog box opens so that
you can enter a description. To change the description later, select
the clip's name and click the Modify button.</p>
<A NAME="TI211"></A><p>You can drag the clip from the Clip window to any script in
which you want to connect to <ACRONYM title = "E A Server" >EAServer</ACRONYM>.
You can also use the Copy icon to copy the clip to the clipboard.</p>
<A NAME="TI212"></A><p>You can hide or display the Clip window using the Clip Window
button on the PowerBar or by selecting Window&gt;Clip. </p>
<br><img src="images/wrkg804.gif">
<A NAME="CEGIECAJ"></A><h2>The Output window</h2>
<A NAME="TI213"></A><p>The output of a variety of operations (migration, builds,
deployment, project execution, object saves, and searches) displays
in the Output window.</p>
<A NAME="TI214"></A><p>When you start a new PowerBuilder session, the Output window
has a single tab, Default. New tabs are added as you perform operations. </p>
<A NAME="TI215"></A><table cellspacing=0 cellpadding=6 border=1 frame="void" rules="all"><tr><th  rowspan="1"  ><A NAME="TI216"></A>Tab</th>
<th  rowspan="1"  ><A NAME="TI217"></A>Contents</th>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI218"></A>Default</td>
<td  rowspan="1"  ><A NAME="TI219"></A>General information about the progress
of full or incremental builds and project deployment</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI220"></A>Debug</td>
<td  rowspan="1"  ><A NAME="TI221"></A>Debugger output, including the paths
of assemblies loaded to support .NET debugging</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI222"></A>Errors</td>
<td  rowspan="1"  ><A NAME="TI223"></A>Messages that indicate problems that
prevent the build or deploy process from completing successfully</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI224"></A>Warnings</td>
<td  rowspan="1"  ><A NAME="TI225"></A>Warning and informational messages</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI226"></A>Search</td>
<td  rowspan="1"  ><A NAME="TI227"></A>Output from search operations</td>
</tr>
<tr><td  rowspan="1"  ><A NAME="TI228"></A>Unsupported features</td>
<td  rowspan="1"  ><A NAME="TI229"></A>For .NET targets, names and locations
of features not supported in the target type</td>
</tr>
</table>
<A NAME="TI230"></A><h4>Using the Output window</h4>
<A NAME="TI231"></A><p>You can hide or display the Output window with the Output
button on the PowerBar or by selecting Window&gt;Output. </p>
<A NAME="TI232"></A><p>You control operations in the window using the Skip, Stop,
Next Error, and Previous Error buttons or menu options. </p>
<A NAME="TI233"></A><p>Tabs display in the order in which they are created and remain
in the Output window for the rest of the PowerBuilder session. To
clear the output from the tabs automatically when you start a new
build, make sure that the Automatically Clear Output Window check
box on the General page of the System Options dialog box is selected.
You can also clear and close tabs manually from the pop-up menu.</p>
<A NAME="TI234"></A><p>When appropriate, lines in the Output window provide links
that invoke the correct painter when you double-click on that line.
The pop-up menu also provides the options Edit and Edit Source to
open an object in a painter or the Source editor. You can copy the
contents of the current tab to the Windows clipboard, save its contents
to a text file, or print its contents to your default printer.</p>
<br><img src="images/wrkgoutp.gif">

